package com.chris.blog.controller;

import com.chris.blog.entity.po.DownloadPO;
import com.chris.blog.service.DownloadService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

import java.util.List;

@Controller
public class DownloadController {

    @Autowired
    private DownloadService downloadService;

    @GetMapping("download")
    public String download(Model model) {
        List<DownloadPO> downloadPOList = downloadService.selectAllDesc();
        model.addAttribute("downloadList", downloadPOList);
        return "page/download";
    }
}
